#ifndef _KTV_ERROR_H_
#define _KTV_ERROR_H_

#include <exception>
#include <string>
#include "ui_std_ex.h"


namespace UI
{
class UI_Ex_Base : public std::exception
{
public:
	UI_Ex_Base(const std::string& sWhat) : m_sWhat(sWhat) { }
	virtual ~UI_Ex_Base(void) throw() { }
	virtual const char* what() const throw() { return std::string(m_sWhat).c_str(); }
	virtual const std::string& std_what() const throw() { return m_sWhat; }
private:
	std::string m_sWhat;
};

class UI_Ex_SDL : public UI_Ex_Base
{
public:
	UI_Ex_SDL(const std::string& sWhat) : UI_Ex_Base(sWhat) { }
};


class UI_Ex_FreeType : public UI_Ex_Base
{
public:
	UI_Ex_FreeType(const std::string& sWhat) : UI_Ex_Base(sWhat) { }
};


class UI_Ex_App : public UI_Ex_Base
{
public:
	UI_Ex_App(const std::string& sWhat) : UI_Ex_Base(sWhat) { }
};


class UI_Ex_Range : public UI_Ex_Base
{
public:
	UI_Ex_Range(const std::string& sWhat) : UI_Ex_Base(sWhat) { }
};

class UI_Func_Err : public UI_Ex_Base
{
public:
	UI_Func_Err(const std::string& sWhat) : UI_Ex_Base(sWhat) { }
};

}
#endif

